package com.jsgt.greekfire.bean

import android.os.Parcel
import android.os.Parcelable

class AssetDetailsResult(): Parcelable {
     var id = 0
     var selectColumns: Any? = null
     var userId = 0
     var assetTypeId = 0
     var amount = 0.0
     var beforeAmount = 0.0
     var afterAmount = 0.0
     var type = 0
     var createAt: String? = null
     var createUserId = 0
     var isDeleted = 0

    constructor(parcel: Parcel) : this() {
        id = parcel.readInt()
        userId = parcel.readInt()
        assetTypeId = parcel.readInt()
        amount = parcel.readDouble()
        beforeAmount = parcel.readDouble()
        afterAmount = parcel.readDouble()
        type = parcel.readInt()
        createAt = parcel.readString()
        createUserId = parcel.readInt()
        isDeleted = parcel.readInt()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeInt(id)
        parcel.writeInt(userId)
        parcel.writeInt(assetTypeId)
        parcel.writeDouble(amount)
        parcel.writeDouble(beforeAmount)
        parcel.writeDouble(afterAmount)
        parcel.writeInt(type)
        parcel.writeString(createAt)
        parcel.writeInt(createUserId)
        parcel.writeInt(isDeleted)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<AssetDetailsResult> {
        override fun createFromParcel(parcel: Parcel): AssetDetailsResult {
            return AssetDetailsResult(parcel)
        }

        override fun newArray(size: Int): Array<AssetDetailsResult?> {
            return arrayOfNulls(size)
        }
    }
}